<template>
    <view class="flex align-center justify-center margin-top-lg">
        <view
            @click="swtich"
            class="check-box margin-right-sm sm"
            :class="[{ checked: modelValue }]"
        ></view>
        <view>我已阅读并同意</view>
        <view class="text-green">《服务协议》</view>
        <view>和</view>
        <view class="text-green">《隐私政策》</view>
    </view>
</template>

<script lang="ts" setup>
const props = withDefaults(defineProps<{ modelValue: boolean }>(), {
    modelValue: false
});
const emit = defineEmits(["update:modelValue"]);

const swtich = () => {
    emit("update:modelValue", !props.modelValue);
};
</script>

<style lang="scss" scoped></style>
